<template>
    <div>
        <div class="shopbody">
            <div class="discountshop">
                <div class="discount-header">
                    <span class="discount-hight">镇店之宝</span>
                    <span class="discount-low">限时折扣&nbsp;惊爆眼球</span>
                </div>
                <div class="discount-table">
                    <ul>
                        <li v-for="(item,index) in list">
                            <router-link to="">
                                <div class="shopping1"><img :src='item.url' alt="">
                                    <div class=""><i class="viplogo">{{item.viplogo}}</i></div>
                                </div>
                                <div class="shopping2">
                                    <span class="discount-left"><i class="lflag"><img :src='item.lflag' alt=""></i><i class="ltxt">&nbsp;{{item.ltxt}}</i></span>
                                    <span class="discount-right"><i class="rend">据结束&nbsp;</i><i class="rtime">09089</i></span>
                                </div>    
                                <div>
                                    <span class="discount-describe">{{item.describe}}</span>
                                    <span class="discount-price">{{item.price}}<i class="lowtxt">&nbsp;起</i></span>
                                </div>
                            </router-link>
                        </li>    
                    </ul>
                </div>
            </div>
             <div class="shopbottom">
                <router-link to=""><span><i class="more">查看更多劲爆折扣</i><i class="arrow">></i></span></router-link>
            </div>
        </div>
        <div class="postagebody">
            <div class="postage">
                <div class="postage-header">
                    <span>7月国际免邮</span>
                </div>
                <div class="postage-con">
                    <ul>
                        <li v-for="(item,index) in postagelist">
                            <router-link to="/">
                                  <div class=""><img :src="item.url" alt=""><span>{{item.txt}}</span></div>
                            </router-link>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="shopbottom">
                <router-link to=""><span><i class="more">查看更多劲爆折扣</i><i class="arrow">></i></span></router-link>
            </div>
        </div>
        <router-view></router-view>
    </div>
</template>
<style>
*{
    margin: 0px;
    padding: 0px;
    list-style: none;
    box-sizing: border-box;
}
.shopbody{
    background: white;
}
.discountshop{
    width: 90%;
    margin: 0px auto;
    padding-top: 20px;
    border-bottom:1px solid #f3f3f3;
}
.discountshop .discount-hight{
    display: inline;
    font-size: 18px;
}
.discountshop .discount-low{
    color: #767676;
}
.discount-table{
    overflow: hidden;
}
.discount-table ul>li{
    width: 49%;
    height: 230px;
    margin: 0px;
    margin-bottom: 10px;
    float: left;
    position: relative;
}
.discount-table ul>li:nth-of-type(2n){
    margin-left: 5px;
}
.shopping1{
    background-color: rgba(0, 0, 0, 0.02) !important;
}
.discount-table .viplogo{
    font-size: 12px;
    color: white;
    background: #0079AF ;
    position: absolute;
    top: 0px;
    left: 0px;
    padding:0px 5px;
}
.shopping1 img{
    height: 127px;
     margin: 18px auto;
     display: block;  
}
.discount-table .shopping2{
    background-color: #f3f3f3;
     height: 28px;
     line-height: 28px;
}
.shopping2 i{
    font-size: 12px;
    font-style: normal;
    color: #767676;
}
.discount-left{
    float: left;
    margin-left: 5px;;
}
.discount-right{
    float: right;
}
.discount-describe{
    color: black;
    display: block;
    font-size: 16px;
    margin-top: 5px;
}
.discount-price{
    color: #B12704;
    font-size: 16px;
}
.discount-price .lowtxt{
    color: #B12704;
    font-size: 12px;
    font-style: normal;
}
.lflag img{
    width: 15px;
    height: 14px;
}
.shopbottom{
    height: 40px;
    background: white;;
}
.shopbottom .more,.arrow{
    color: #0079AF ;
    font-size: 18px;
    font-style: normal;
    float: left;
    margin-left:22px;
    line-height: 40px;
}
.shopbottom .arrow{
    float: right;
    margin-right:22px;
}
/* -------------------------7月包邮----------------------------- */
.postagebody{
    background: white;
    
}
.postage a{
    color: #767676;
}
.postage{
    width: 90%;
    height: 280px;
    margin: 0px auto;
    border-bottom:1px solid  #f3f3f3;  
}
.postage ul{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content:space-between;
    width:100%;
}
.postage li{
    width: 46%;
    height: 100px;
    margin-left: 0px;

}
.postage img{
   width:170px;
   
}
.postage-header{
   height: 30px;
   margin-bottom: 20px;;
}
.postage-header span{
    font-size: 20px;
}

</style>
<script>
export default{
	data(){
		return{
             list:[],
             postagelist:[]
		 	}
		},
	mounted(){
            var _this=this;
            this.$http.get('./data/MainTimer.json') 
                .then((response)=> {
                console.log(response);
                this.list=response.data.list;
                this.postagelist=response.data.postagelist;
                //  console.log(this.list)
                    console.log(this.postagelist)
            })
            .catch(function (error) {
                console.log(error);
            })
            .then(function () {
                // always executed
            }) 
            }           
}
</script>